export default {
    name: "i-data",
    data() {
        return {
            loading: false,
            data: {products: [], files: []},
            ruleValidate: {
                district: [{required: true, message: "入境关区"}],
                weight: [{required: true, message: "货物总重量不能为空", type: 'number'}],
                piece: [{required: true, message: "货物件数不能为空", type: 'number'}],
                transport: [{required: true, message: "运输方式选择"}],
                packing: [{required: true, message: "包装种类选择"}],
                type: [{required: true, message: "进境类型选择"}],
                remark: [{max: 255, message: "备注说明选择"}],
            }
        }
    },
    methods: {
        addFileHandle() {
            this.data.files.push({
                type: '',
                url: ''
            })
        },
        deleteFileHandle(index){
            this.data.files.splice(index, 1);
        }
    }
}
